package com.syni.mdd.yhd.common.all.controller.api;

import com.syni.mdd.yhd.common.all.service.market.BmsMarketCouponService;
import com.syni.mdd.yhd.common.all.service.market.BmsMarketReceService;
import com.syni.mdd.sjb.common.component.utils.common.utils.ParamsMap;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @className ApiMarketController
 * @description TOO
 * @Author cfx
 * @DATE 2019/10/25 14:08
 * @VERSION 1.0
 **/
@RestController
@RequestMapping("/apiMarket")
public class ApiMarketController {

    @Autowired
    BmsMarketCouponService bmsMarketCouponService;

    @Autowired
    BmsMarketReceService bmsMarketReceService;


    @PostMapping("/produceCoupon")
    public Map<String,Object> produceCoupon(@RequestBody ParamsMap paramsMap){
        return bmsMarketCouponService.produceCoupon(paramsMap);
    }

    @PostMapping("/userReceCoupon")
    public Map<String,Object> userReceCoupon(@RequestBody ParamsMap paramsMap){
        return bmsMarketReceService.userReceCoupon(paramsMap);
    }
}
